package com.wechat.apidoc.background;

import com.wechat.entity.QuestionLib;
import com.wechat.utils.ActionResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;

/**
 * Created by ycx on 2018/4/16.
 */
@Api(description = "后台部分接口文档")
public interface WxBackgroundInterface {

    @ApiOperation(value = "题库管理", notes = "" +
            "\"data\": {\n" +
            "    \"pageNum\": \"当前第几页\",\n" +
            "    \"pageSize\": \"每页显示条数\",\n" +
            "    \"total\": \"总条数\",\n" +
            "    \"pages\": \"总页数\",\n" +
            "    \"list\":{\n" +
            "       \"question\": \"试题题目\",\n" +
            "       \"answersA\": \"备选答案A\",\n" +
            "       \"answersB\": \"备选答案B\",\n" +
            "       \"answersC\": \"备选答案C\",\n" +
            "       \"answersD\": \"备选答案D\",\n" +
            "    };\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", dataType = "int")
    })
    ActionResult questionLibList(Integer pageNum, Integer pageSize);

    @ApiImplicitParams({
            @ApiImplicitParam(name = "questionLibId", value = "题库题目ID", paramType = "query", dataType = "int")
    })
    @ApiOperation(value = "题库编辑管理", notes = "题库编辑管理")
    ActionResult questionLibEdit(Integer questionLibId);

    @ApiImplicitParams({
            @ApiImplicitParam(name = "question", value = "题目", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersA", value = "答案A", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersB", value = "答案B", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersC", value = "答案C", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersD", value = "答案D", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "trueAnswer", value = "正确答案", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "type", value = "类型(0:单选 1:多选)", paramType = "query", dataType = "int")
    })
    @ApiOperation(value = "题库入库管理", notes = "题库入库管理")
    ActionResult questionLibAdd(QuestionLib record);


    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "题库题目ID", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "question", value = "题目", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersA", value = "答案A", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersB", value = "答案B", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersC", value = "答案C", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "answersD", value = "答案D", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "trueAnswer", value = "正确答案", paramType = "query", dataType = "string"),
            @ApiImplicitParam(name = "type", value = "类型(0:单选 1:多选)", paramType = "query", dataType = "int")
    })
    @ApiOperation(value = "题库更新管理", notes = "题库更新管理")
    ActionResult questionLibUpdate(QuestionLib record);

    @ApiOperation(value = "提现记录", notes = "" +
            "\"data\": {\n" +
            "    \"pageNum\": \"当前第几页\",\n" +
            "    \"pageSize\": \"每页显示条数\",\n" +
            "    \"total\": \"总条数\",\n" +
            "    \"pages\": \"总页数\",\n" +
            "    \"list\":{\n" +
            "       \"nickname\": \"昵称\",\n" +
            "       \"balance\": \"余额\",\n" +
            "       \"totalFee\": \"提现金额\",\n" +
            "       \"createTime\": \"申请提现时间\",\n" +
            "       \"dataState\": \"处理结果(状态: 0未处理, 1已处理, 2处理失败)\",\n" +
            "    };\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "nickname", value = "昵称", paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "isDesc", value = "0-升序，1-降序", paramType = "query", dataType = "int")
    })
    ActionResult withdrawcashRecordsList(Integer pageNum, Integer pageSize, String nickname, Integer isDesc);

    @ApiOperation(value = "答题记录", notes = "" +
            "\"data\": {\n" +
            "    \"pageNum\": \"当前第几页\",\n" +
            "    \"pageSize\": \"每页显示条数\",\n" +
            "    \"total\": \"总条数\",\n" +
            "    \"pages\": \"总页数\",\n" +
            "    \"list\":{\n" +
            "       \"id\": \"答题记录编号\",\n" +
            "       \"questionId\": \"出题编号\",\n" +
            "       \"nickname\": \"昵称\",\n" +
            "       \"createTime\": \"答题时间\",\n" +
            "       \"totalRight\": \"正确数\",\n" +
            "       \"avatarUrl\": \"出题人\",\n" +
            "       \"amount\": \"获得红包\",\n" +
            "    };\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "answerPerson", value = "昵称", paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "questionPerson", value = "出题人", paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "questionId", value = "出题编号", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "isDesc", value = "0-升序，1-降序", paramType = "query", dataType = "int")
    })
    ActionResult answerList(Integer pageNum, Integer pageSize, String answerPerson, String questionPerson, Integer questionId, Integer isDesc);

    @ApiOperation(value = "查看答题情况", notes = "" +
            "\"data\": {\n" +
            "    \"name\": \"试题题目\",\n" +
            "    \"answer\": \"答案\",\n" +
            "    \"isRight\": \"是否正确 0-错误 1-正确\",\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "answerId", value = "答题记录编号", paramType = "query", required = true, dataType = "int")
    })
    ActionResult seeAnswer(Integer answerId);

    @ApiOperation(value = "出题记录", notes = "" +
            "\"data\": {\n" +
            "    \"pageNum\": \"当前第几页\",\n" +
            "    \"pageSize\": \"每页显示条数\",\n" +
            "    \"total\": \"总条数\",\n" +
            "    \"pages\": \"总页数\",\n" +
            "    \"list\":{\n" +
            "       \"id\": \"出题编号\",\n" +
            "       \"nickname\": \"昵称\",\n" +
            "       \"createTime\": \"出题时间\",\n" +
            "       \"totalQuestionNumber\": \"总问题数\",\n" +
            "       \"amountStatus\": \"红包状态: 0待支付 1 红包已领完 2红包未领完 3已退回\",\n" +
            "    };\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "nickname", value = "昵称", paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "id", value = "出题编号", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "isDesc", value = "0-升序，1-降序", paramType = "query", dataType = "int")
    })
    ActionResult questionList(Integer pageNum, Integer pageSize, String nickname, Integer id, Integer isDesc);

    @ApiOperation(value = "查看题目", notes = "" +
            "\"data\": {\n" +
            "    \"question\": \"试题题目\",\n" +
            "    \"trueAnswer\": \"用户设置的答案\",\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "questionId", value = "出题编号", paramType = "query", required = true, dataType = "int")
    })
    ActionResult seeQuestion(Integer questionId);

    @ApiOperation(value = "红包发放概况", notes = "" +
            "\"data\": {\n" +
            "    \"createTime\": \"红包设置时间\",\n" +
            "    \"totalRight\": \"答对几道可领\",\n" +
            "    \"totalAmount\": \"红包总金额\",\n" +
            "    \"accountAmount\": \"红包余额\",\n" +
            "    \"totalNumber\": \"红包总个数\",\n" +
            "    \"surplusNumber\": \"剩余红包数\",\n" +
            "    \"amountStatus\": \"红包状态: 0待支付 1 红包已领完 2红包未领完 3已退回\",\n" +
            "  };\n" +
            "\"redPacket\":\"已发金额\"\n" +
            "\"number\":\"已发个数\"\n" +
            "\"returnAmount\":\"退回金额\"\n"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "id", value = "出题编号", paramType = "query", required = true, dataType = "int")
    })
    ActionResult seeRedPpacket(Integer id);

    @ApiOperation(value = "用户管理", notes = "" +
            "\"data\": {\n" +
            "    \"pageNum\": \"当前第几页\",\n" +
            "    \"pageSize\": \"每页显示条数\",\n" +
            "    \"total\": \"总条数\",\n" +
            "    \"pages\": \"总页数\",\n" +
            "    \"list\":{\n" +
            "       \"nickname\": \"昵称\",\n" +
            "       \"balance\": \"余额\",\n" +
            "       \"makeQuestionNum\": \"出题记录\",\n" +
            "       \"answerNum\": \"答题记录\",\n" +
            "       \"createTime\": \"注册日期\",\n" +
            "    };\n" +
            "  };"
    )
    @ApiImplicitParams({
            @ApiImplicitParam(name = "pageNum", value = "第几页", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "pageSize", value = "每页显示条数", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "nickname", value = "昵称", paramType = "query", dataType = "String"),
            @ApiImplicitParam(name = "sort", value = "0-出题记录，1-答题记录，2-注册日期", paramType = "query", dataType = "int"),
            @ApiImplicitParam(name = "isDesc", value = "0-升序，1-降序", paramType = "query", dataType = "int")
    })
    ActionResult userList(Integer pageNum, Integer pageSize, String nickname, Integer sort, Integer isDesc);

}































